
import React, { useState, useEffect } from 'react';
import {View,Text} from "@tarojs/components";

function Example() {
  const [count, setCount] = useState(0);

  useEffect(()=>{
    console.log(`current count is ${count}`);
  });

  return (
    <View>
      <Text>You clicked {count} times</Text>
      <button
        onclick={()=> setCount(count + 1)}
      >
        Click me
      </button>
    </View>
  );
}

export default Example;
